package com.adwhirl.eventadapter;

import java.util.List;
import com.adwhirl.obj.Extra;
import com.adwhirl.obj.Ration;
import com.adwhirl.util.AdWhirlUtil;

public class GmAdWhirlEventAdapterData {
	public static final String	CONST_STR_APPID_ADWHIRL					= "f19d6669e4684a7185da83bd45b52c98";	// abb4b43cded4450a8f1150cbbf57b9db
	//是否打印LOG信息
	public static boolean		CONST_EVENTADAPTERLOG_ENABLED			= false;
	// 是否为强制读取服务器设置
	public static final boolean	CONST_FORCEFETCHSERVER_ENABLED			= false;
	// 是否则试某一家adnetwork
	public static final boolean	CONST_EVENTADDEBUG_FORCEMODE_ENABLED	= false;
	// 是否为测试广告
	public static boolean		ADNETWORK_TESTMOBLE						= false;
	
	public static GmEventADType	deBugAdType								= GmEventADType.YOUMI;
	public enum GmEventADType {
		// international
		// domestic
		ADMOB("admob", "a14f6df8d43ce0a", null), 
		IMOCHA("imocha", null, null), 
		WAPS("waps", "ed247f0b16933aeabcc44042ad8a131d", null), 
		YOUMI("youmi", "e7c149246391b3b6","028ebea31220aba2");
		public String adName;
		public String key;
		public String key2;

		GmEventADType(String adName, String key, String key2) {
			this.adName = adName;
			this.key = key;
			this.key2 = key2;
		}
	};
	
	public static Ration getDebugRation(GmEventADType deBugAdType) {
		Ration ration = null;
		if (deBugAdType == GmEventADType.ADMOB) {
			// [{"nid":"70e10523a5d24dfbbe7b7fcb9686bddc","type":1,"nname":"admob","weight":20,"priority":1,"key":"a14ecc6886e728c"},
			ration = new Ration();
			ration.nid = "70e10523a5d24dfbbe7b7fcb9686bddc";
			ration.type = AdWhirlUtil.NETWORK_TYPE_ADMOB;
			ration.name =  deBugAdType.adName;
			ration.weight = 50;
			ration.priority = 2;
			ration.key = deBugAdType.key;
			ration.key2 = deBugAdType.key2;
		}else if (deBugAdType==GmEventADType.YOUMI) {
			ration = new Ration();
			ration.nid = "70e10523a5d24dfbbe7b7fcb9686bddc";
			ration.type = AdWhirlUtil.NETWORK_TYPE_EVENT;
			ration.name = deBugAdType.adName;
			ration.weight = 50;
			ration.priority = 2;
			ration.key = deBugAdType.key;
			ration.key2 = deBugAdType.key2;
		}
		return ration;
	}
	
	public static void initDefaultRationList(List<Ration> rationsList) {
		rationsList.add(getDebugRation(GmEventADType.ADMOB));
		rationsList.add(getDebugRation(GmEventADType.YOUMI));
	}
	
	public static void initDefaultExtra(Extra extra) {
		extra.cycleTime = 60;
	}
}
